import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/search',
    name: 'Search',
    component: () => import('../views/Search.vue')
  },
  {
    path: '/case/:id',
    name: 'CaseDetail',
    component: () => import('../views/CaseDetail.vue')
  },
  {
    path: '/profile',
    name: 'Profile',
    component: () => import('../views/Profile.vue')
  },
  {
    path: '/document/:id',
    name: 'DocumentDetail',
    component: () => import('../views/DocumentDetail.vue')
  },
  {
    path: '/law/:id',
    name: 'LawDetail',
    component: () => import('../views/LawDetail.vue')
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
